import json

data = {"a": 1, "b": 2}
print(json.dumps(data,separators=(",",":")))
